<?php
if ( ! defined('ROOT')) exit('No direct script access allowed');

/**
 * 管理员模型类
 * @author gzute
 * @link http://www.gzute.com
 * @E_mail gzute@qq.com
 */

class RoleModel extends Model
{
	public function __construct()
	{
		self::$table = 'role';
		parent::__construct();
	}
	
	public static function findBytotal()
	{
		return self::db()->count_all(self::$table);
	}
	
	public static function findBypages($offset,$pagesize)
	{
		$data = self::db()->get(self::$table,$pagesize,$offset)->result_array();
		return $data;
	}
}